import { createApp } from "vue";
// import './style.css'
import App from "./App.vue";
//引入全局less文件
import "./assets/global.less";
import "./assets/el-reset.less";
//引入路由
import router from "./router";
//引入ElementPlus组件库
import ElementPlus from "element-plus";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import "element-plus/dist/index.css";
import { createPinia } from "pinia";
let pinia = createPinia();

//引入pinia持久存储的插件
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
//使用持久化存储
pinia.use(piniaPluginPersistedstate);

//引入路由钩子
import "./utils/routerHook";
let app = createApp(App);

app.use(pinia);
app.use(ElementPlus);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
app.use(router);
app.mount("#app");
